﻿using System.Linq;
using System.Windows.Forms;
using IGM.DataProvider.Entites;
using IGM.Framework.Constants;
using IGM.Presentation.IgmServiceReference;

namespace IGM.Presentation.Management
{
    public partial class InternManagementControl : UserControl
    {
        private readonly DomainServiceClient _domainServiceClient;

        public InternManagementControl()
        {
            InitializeComponent();
            _domainServiceClient = new DomainServiceClient();  
        }
        private void InternManagementControlLoad(object sender, System.EventArgs e)
        {
            LoadKindInterns();
            Dock = DockStyle.Top;
        }
        private void LoadKindInterns()
        {
            cboKindInterns.DataSource = _domainServiceClient.GetKindInterns().Cast<KindIntern>().ToList();
            cboKindInterns.DisplayMember = "Name";
            cboKindInterns.ValueMember = "Id";
        }

        private void LoadStudentMarks()
        {
            if (cboKindInterns.Items.Count > 0)
            {                
            }
            else
                MessageBox.Show(ConstantMessages.CanNotFindItem, @"loại thực tập/ tốt nghiệp");
        }                 
    }
}
